﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace Storage.Admin.Models
{
    public class UpImgModel
    {
        [Required(ErrorMessage ="apk必须填写")]
        public string apk { get; set; }

        [Required(ErrorMessage = "bucket必须填写")]
        public string bucket { get; set; }

        [Required(ErrorMessage = "signature必须填写")]
        public string signature { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [RegularExpression(@"^[1-9]\d{9}$",ErrorMessage ="开始时间10时间戳")]
        public int startTime { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [RegularExpression(@"^[1-9]\d{9}$",ErrorMessage ="结束时间10时间戳")]
        public int endTime { get; set; }

        /// <summary>
        /// xxx/xxx
        /// 最多就两级
        /// </summary>
        [RegularExpression(@"^[a-zA-Z]+/?[a-zA-Z]*$")]
        public string filePath { get; set; }
    }
}